// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue'
import App from './App'
import router from './router'

//指定在生产环境下不打印提示
Vue.config.productionTip = false

//滚动条插件
import { HappyScroll } from 'vue-happy-scroll'
//自定义组件名
Vue.component('happy-scroll', HappyScroll)
// 引入css
import 'vue-happy-scroll/docs/happy-scroll.css'

//bootstrap
import 'bootstrap/dist/css/bootstrap.min.css'

//font-awesome
import 'font-awesome/css/font-awesome.min.css'

//导入 vue-resource
import VueResource from 'vue-resource'
//安装 vue-resource
Vue.use(VueResource)
// 设置请求的根路径
//Vue.http.options.root = 'http://localhost:3000';
// 全局设置 post 时候表单数据格式组织形式   application/x-www-form-urlencoded
Vue.http.options.emulateJSON = true;

// 导入 MUI 的样式
//import '@/assets/lib/mui/css/mui.min.css'
// 导入扩展图标样式
//import '@/assets/lib/mui/css/icons-extra.css'

import MintUI from 'mint-ui'
Vue.use(MintUI)
import 'mint-ui/lib/style.css'


//导入vuex仓库
import store from './store'

//通用样式
import './assets/css/common.css'

//对请求进行拦截
Vue.http.interceptors.push((request, next) => {
    //console.log('request start')
    // continue to next interceptor
    //next(function(response){
    //    console.log(response)
    //});
    next()
});
/* eslint-disable no-new */

import '@/assets/less/index.less'


new Vue({
    el: '#app',
    router, //挂载路由对象到 VM 实例上
    store, // 挂载 store 状态管理对象
    components: {App},
    template: '<App/>'
})
